<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="Author" content="larry" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../../statics/common/cascader/cascader/cascader.css" media="all">
<link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/layui.css" media="all">
<link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/autocomplete.css">
<link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/soulTable.css">
<link rel="stylesheet" type="text/css" href="../../statics/plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" type="text/css" href="../../statics/css/common.css">
<link rel="stylesheet" type="text/css" href="../../statics/css/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../../statics/css/list-search-table.css">
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layui-soul-table/docs/soulTable.css" media="all"/>-->
<script type="text/javascript" src="../../statics/plugins/jquery.min.js"></script>
<script type="text/javascript" src="../../statics/common/lib/vue.min.js"></script>
<script type="text/javascript" src="../../statics/plugins/ztree/jquery.ztree.all.min.js"></script>
<script type="text/javascript" src="../../statics/common/layui/layui.all.js"></script>
<script type="text/javascript" src="../../statics/common/js/axios.min.js"></script>
<script type="text/javascript" src="../../statics/common/js/xm-select.js"></script>
<script type="text/javascript" src="../../statics/js/common.js"></script>
<script type="text/javascript" src="../../statics/js/upload.js"></script>
<script type="text/javascript" src="../../statics/common/step/steps.js"></script>
<link rel="stylesheet" href="../../statics/css/jxcPublicAll.css"  media="all">
<link href="../../statics/common/photoviewer/dist/photoviewer.css" rel="stylesheet">
<link rel="stylesheet" href="../../statics/common/step/steps.css">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.7/cropper.css" media="all">-->
<link rel="stylesheet" href="../../statics/js/modules/cropper/cropper.css" media="all">
<link rel="stylesheet" type="text/css" href="../../statics/css/viewer.min.css">
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.7/cropper.min.js"></script>-->
<script src="../../statics/js/modules/cropper/cropper.min.js"></script>
<script src="../../statics/common/photoviewer/dist/photoviewer.js"></script>
<script src="../../statics/common/layui/autocomplete.js"></script>
<script  src="../../statics/js/modules/viewer/viewer.min.js"></script>
<script src="../../statics/common/print-js/print.min.js"></script>
<link rel="stylesheet" type="text/css" href="../../statics/common/print-js/print.min.css">
<script type="text/javascript" src="../../statics/common/xmselect/xm-select.js"></script>
<script type="text/javascript" src="../../statics/js/searchview.js"></script>
<script type="text/javascript" src="../../statics/js/tableedit.js"></script>

<!--<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.0&type=webgl&ak=eo4XeZhRKHsQ0NOe6u6NkKscmRsk416B"></script>-->

<!-- 引入组件库 -->
<link rel="stylesheet" type="text/css" href="../../statics/css/index.css">






        <style>
            .layui-form-label {
                width: 145px;
            }

        </style>
        </head>
<body class="ren-body">
<div id="rrapp" v-cloak>
    <div class="list-search-title-box">
        <div class="list-search-sup-title">
            筛选条件
        </div>
        <form class="layui-form">
            <section class="jxc-section">
                <div class="card layui-row">
                    <div class="layui-form-item ">
                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">广告名称</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="q.advertName" autocomplete="off" placeholder="广告名称"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">广告类型</label>
                            <div class="layui-input-inline">
                                <select name="advertType" class="layui-select" v-model="q.advertType"
                                        lay-filter="advertTypeSelect">
                                    <option value="1">轮播广告</option>
                                    <!--<option  value="2">楼层广告</option>-->
                                    <option value="3">活动广告</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">审核状态</label>
                            <div class="layui-input-inline">
                                <select name="censorStatus" class="layui-select" v-model="q.censorStatus"  lay-filter="censorStatusSelect">
                                    <option value="1">通过</option>
                                    <option value="0">未通过</option>
                                    <option value="2">待审核</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">可用状态</label>
                            <div class="layui-input-inline">
                                <select name="isAvailable" class="layui-select" v-model="q.isAvailable"
                                        lay-filter="isAvailableSelect">
                                    <option value="1">可用</option>
                                    <option value="0">不可用</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
            <div style="display: flex;align-items: center;justify-content: center;">
                <div class="layui-form-item layui-row">
                    <div class="list-search-form-button">
                        <a class="layui-btn search-btn" @click="query">查询</a>
                        <a class="layui-btn reset-btn" @click="reset">重置</a>
<!--                        <#if shiro.hasPermission("car:advert:save")>-->
                           <a class="layui-btn search-btn" @click="add" v-m-perm="['car:advert:save']">新增</a>
<!--                         </#if>-->
                        <!--<#if shiro.hasPermission("car:advert:export")>
                            <a class="layui-btn layui-btn-danger layui-btn-normal" @click="exports">导出</a>
                        </#if>-->
                    </div>
                </div>
            </div>
        </form>
    </div>

    <table class="layui-hide" id="grid" lay-filter="grid"></table>
    <!--新增编辑 from-表单 -->
    <form v-show="editForm" class="layui-form ren-form" id="editForm">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">广告类型<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <select name="advertType" class="layui-select" lay-verify="advertType" v-model="advert.advertType"  lay-filter="advertTypeAdd">
                        <option value="1">轮播广告</option>
                  <!-- <option  value="2">楼层广告</option>-->
                        <option value="3">活动广告</option>
                    </select>

                </div>
            </div>
            <div class="layui-inline" id="ranking">
                <label class="layui-form-label">位置<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" name="ranking" lay-verify="ranking" v-model="advert.ranking" autocomplete="off"  placeholder="排名位置" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item" id="carouselTypeDiv">
            <div class="layui-inline">
                <label class="layui-form-label">轮播类型<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <select name="carouselType" class="layui-select" v-model="advert.carouselType"  lay-filter="carouselType">
                        <option value="">请选择</option>
                        <option value="1">小程序</option>
                        <option value="2">APP</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline"  v-if="advert.advertType==1">
                <label class="layui-form-label">广告名称<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" lay-verify="advertName" v-model="advert.advertName" autocomplete="off"  placeholder="活动名称" class="layui-input">
                </div>
            </div>
            <div class="layui-inline"  v-if="advert.advertType==3">
                <label class="layui-form-label">活动广告标题<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" lay-verify="advertName" v-model="advert.advertName" autocomplete="off"  placeholder="活动名称" class="layui-input">
                </div>
            </div>
            <div class="layui-inline" v-if="advert.advertType==1">
                <label class="layui-form-label">跳转类型<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <div>
                        <select name="jumpType" class="layui-select" lay-verify="jumpType" lay-filter="jumpType" v-model="advert.jumpType">
                            <option value="">请选择</option>
                            <option value="1">外部链接</option>
                            <option value="2">内容</option>
                     <!--  <option  value="3" >产品</option>-->
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-inline" v-if="advert.advertType==3">
                <label class="layui-form-label">跳转类型<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <div>
                        <select name="jumpType" class="layui-select" lay-verify="jumpType" lay-filter="jumpType" v-model="advert.jumpType">
                              <option  value="3" >产品</option>
                        </select>
                    </div>
                </div>
            </div>

        </div>
        <div class="layui-form-item" v-if="advert.jumpType==1">
            <div class="layui-inline">
                <label class="layui-form-label">跳转链接<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <input type="text" name="linkUrl" v-model="advert.linkUrl" autocomplete="off" placeholder="跳转链接"  class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item"  id="textDiv">
            <div class="layui-inline">
                <label class="layui-form-label">内容<span style="color:red">*</span></label>
                <div class="layui-input-inline" style="width: 700px;">
                    <textarea id="advert_text" placeholder="请输入内容" class="layui-textarea"  v-model="advert.text" ></textarea>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline  layui-col-xs8" style="margin-left: -10px;">
                <label class="layui-form-label">图片<span style="color:red">*</span></label>
                <div class="layui-input-block">
                    <div class="layui-upload-list layui-col-xs8" id="pic">
                        <img class="layui-upload-img"
                             v-bind:src="fillAdvertPicUrl || '../../statics/images/plus.png'"
                             style="width:75%;height:200px;border:1px dashed #c0ccda;border-radius:6px;cursor: pointer;"
                             id="imgCarBrandLogo"
                             @click="selectFile(1)">
                        <button type="button" class="layui-btn" id="uploadFile"
                                style="margin-top:172px;margin-left:20px;display:none;"></button>
                        <button type="button" class="layui-btn" id="uploadAction"
                                style="margin-top:172px;margin-left:20px;display:none;">上传
                        </button>
                        <button type="button" class="layui-btn" style="margin-top:172px;margin-left:20px;"
                                @click="uploadFile('advert')">上传
                        </button>
                    </div>
                </div>
            </div>
        </div>
        <div  class="layui-inline"  v-if="advert.advertType==3">
            <label class="layui-form-label">是否有咨询栏<span style="color:red">*</span></label>
            <div class="layui-input-inline">
                <input type="radio" name="whether" value="1" title="是" v-model="advert.whether" lay-filter="whether">
                <input type="radio" name="whether" value="2" title="无" v-model="advert.whether" lay-filter="whether">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <div class="layui-input-inline">
                    <button class="layui-btn" lay-submit lay-filter="saveOrUpdate" style="margin-left: 60px;">确定
                    </button>
                    <a class="layui-btn reset-btn" @click="cancel" style="margin-left: 150px;margin-top: -50px;">取消</a>
                </div>
            </div>
        </div>
    </form>
    <!--审核  from 表单-->
    <form v-show="auditForm" class="layui-form ren-form" id="auditForm">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 80px;">审核状态<span style="color:red">*</span></label>
                <input type="hidden" name="advertNo" v-model="advert.advertNo">
                <div class="layui-input-inline">
                    <input type="radio" name="censorStatus" value="1" title="通过" checked="">
                    <input type="radio" name="censorStatus" value="0" title="未通过">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <div class="layui-input-inline" style="margin-left: 30px;">
                        <button class="layui-btn" lay-submit lay-filter="saveCensorStatusForm">确定</button>
                        <a class="layui-btn reset-btn" @click="cancel">取消</a>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <!--详情form表单 -->
    <form v-show="detailsForm" class="layui-form ren-form" id="detailsForm">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">广告类型:</label>
                <div class="layui-input-inline">
                    <input type="text"  v-model="advertTypeStr" autocomplete="off"   class="layui-input" readonly>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">位置:</label>
                <div class="layui-input-inline">
                    <input type="text" name="ranking" lay-verify="ranking" v-model="advert.ranking" autocomplete="off"   class="layui-input" readonly>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">轮播类型<span style="color:red">*</span></label>
                <div class="layui-input-inline">
                    <div class="layui-input-inline">
                        <input type="text"  v-model="carouselTypeStr" autocomplete="off"   class="layui-input" readonly>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline"  v-if="advert.advertType==1">
                <label class="layui-form-label">广告名称:</label>
                <div class="layui-input-inline">
                    <input type="text" lay-verify="advertName" v-model="advert.advertName" autocomplete="off"   class="layui-input" readonly>
                </div>
            </div>
            <div class="layui-inline"  v-if="advert.advertType==3">
                <label class="layui-form-label">活动广告标题:</label>
                <div class="layui-input-inline">
                    <input type="text" lay-verify="advertName" v-model="advert.advertName" autocomplete="off"   class="layui-input" readonly>
                </div>
            </div>
            <div class="layui-inline" v-if="advert.advertType==1">
                <label class="layui-form-label">跳转类型:</label>
                <div class="layui-input-inline">
                    <input type="text"  v-model="jumpTypeStr" autocomplete="off"   class="layui-input" readonly>
                </div>
            </div>
            <div class="layui-inline" v-if="advert.advertType==3">
                <label class="layui-form-label">跳转类型:</label>
                <div class="layui-input-inline">
                    <input type="text"  v-model="jumpTypeStr" autocomplete="off"   class="layui-input" readonly>
                </div>
            </div>
        </div>
        <div class="layui-form-item" v-if="advert.jumpType==1">
            <div class="layui-inline">
                <label class="layui-form-label">跳转链接:</label>
                <div class="layui-input-inline">
                    <input type="text" name="linkUrl" v-model="advert.linkUrl" autocomplete="off"  class="layui-input" readonly>
                </div>
            </div>
        </div>
        <div class="layui-form-item"  id="textDivDetil">
            <div class="layui-inline">
                <label class="layui-form-label">内容:</label>
                <div class="layui-input-inline" style="width: 700px;">
                    <textarea  id="textDetial" class="layui-textarea"  v-model="advert.text" readonly ></textarea>
                </div>
            </div>
        </div>
        <div class="layui-form-item" id="advertPicUrl1">
            <div class="layui-inline">
                <label class="layui-form-label">广告图片:</label>
                <div class="layui-input-inline">
                    <img class="layui-upload-img" style="width:250%;height:150px;" :src="imageURL+advert.advertPicUrl">
                </div>
            </div>
        </div>
        <div  class="layui-inline"  v-if="advert.advertType==3">
            <label class="layui-form-label">是否有咨询栏（是/否）:</label>
            <div class="layui-input-inline">
                <input type="radio" name="whether" value="1" title="是" v-model="advert.whether" lay-filter="whether">
                <input type="radio" name="whether" value="2" title="无" v-model="advert.whether" lay-filter="whether">
            </div>
        </div>
        <div class="layui-form-item" style="margin-left: 300px;margin-top: 50px;">
            <a class="layui-btn reset-btn" @click="cancel">取消</a>
        </div>
    </form>

</div>


<!--操作-->
<script type="text/html" id="barTpl">
    {{#if(d.censorStatus===0){}}
<!--    <#if shiro.hasPermission("car:advert:audit")>-->
        <a class="layui-grid-btn-xs" lay-event="audit" v-m-perm="['car:advert:audit']">审核</a>
<!--    </#if>-->
<!--    <#if shiro.hasPermission("car:advert:update")>-->
        <a class="layui-grid-btn-xs" lay-event="edit" v-m-perm="['car:advert:update']">编辑</a>
<!--    </#if>-->
<!--    <#if shiro.hasPermission("car:advert:details")>-->
        <a class="layui-grid-btn-xs" lay-event="details" v-m-perm="['car:advert:details']">详情</a>
<!--    </#if>-->
<!--    <#if shiro.hasPermission("car:advert:delete")>-->
        <a class="layui-grid-btn-xs" lay-event="del" v-m-perm="['car:advert:details']">删除</a>
<!--    </#if>-->
    {{#}else if((d.censorStatus===1) && (d.isAvailable==0)){}}
<!--    <#if shiro.hasPermission("car:advert:isAvailable")>-->
        <a class="layui-grid-btn-xs" lay-event="isAvailable" v-m-perm="['car:advert:isAvailable']">启用</a>
<!--    </#if>-->
<!--    <#if shiro.hasPermission("car:advert:update")>-->
        <a class="layui-grid-btn-xs" lay-event="edit" v-m-perm="['car:advert:update']">编辑</a>
<!--    </#if>-->
<!--    <#if shiro.hasPermission("car:advert:details")>-->
        <a class="layui-grid-btn-xs" lay-event="details" v-m-perm="['car:advert:details']">详情</a>
<!--    </#if>-->
<!--    <#if shiro.hasPermission("car:advert:delete")>-->
        <a class="layui-grid-btn-xs" lay-event="del" v-m-perm="['car:advert:delete']">删除</a>
<!--    </#if>-->
    {{#}else if((d.censorStatus===1) && (d.isAvailable==1)){}}
<!--    <#if shiro.hasPermission("car:advert:available")>-->
        <a class="layui-grid-btn-xs" lay-event="available" v-m-perm="['car:advert:available']">停用</a>
<!--    </#if>-->
<!--    <#if shiro.hasPermission("car:advert:details")>-->
        <a class="layui-grid-btn-xs" lay-event="details" v-m-perm="['car:advert:details']">详情</a>
<!--    </#if>-->
    {{#}else if((d.censorStatus===2)){}}
<!--    <#if shiro.hasPermission("car:advert:audit")>-->
        <a class="layui-grid-btn-xs" lay-event="audit" v-m-perm="['car:advert:audit']">审核</a>
<!--    </#if>-->
<!--    <#if shiro.hasPermission("car:advert:update")>-->
        <a class="layui-grid-btn-xs" lay-event="edit" v-m-perm="['car:advert:update']">编辑</a>
<!--    </#if>-->
<!--    <#if shiro.hasPermission("car:advert:details")>-->
        <a class="layui-grid-btn-xs" lay-event="details" v-m-perm="['car:advert:details']">详情</a>
<!--    </#if>-->
<!--    <#if shiro.hasPermission("car:advert:delete")>-->
        <a class="layui-grid-btn-xs" lay-event="del" v-m-perm="['car:advert:delete']">删除</a>
<!--    </#if>-->
    {{#}}}


</script>
<script src="../../statics/js/modules/advert/advert.js">
</script>


</body>
</html>
